<!--
  * t
  ****************************************************************************
  * Copyright 2019-2024,2025 Thomas E. Dickey                                *
  * Copyright 2001-2015,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  * "Software"), to deal in the Software without restriction, including      *
  * without limitation the rights to use, copy, modify, merge, publish,      *
  * distribute, distribute with modifications, sublicense, and/or sell       *
  * copies of the Software, and to permit persons to whom the Software is    *
  * furnished to do so, subject to the following conditions:                 *
  *                                                                          *
  * The above copyright notice and this permission notice shall be included  *
  * in all copies or substantial portions of the Software.                   *
  *                                                                          *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
  * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
  *                                                                          *
  * Except as contained in this notice, the name(s) of the above copyright   *
  * holders shall not be used in advertising or otherwise to promote the     *
  * sale, use or other dealings in this Software without prior written       *
  * authorization.                                                           *
  ****************************************************************************
  * @Id: curs_add_wch.3x,v 1.102 2025/02/01 23:54:03 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
<TITLE>curs_add_wch 3x 2025-02-01 ncurses 6.5 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">

</HEAD>
<BODY>
<H1 class="no-header">curs_add_wch 3x 2025-02-01 ncurses 6.5 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>                 Library calls                <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>




</PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
       <STRONG>add_wch</STRONG>, <STRONG>wadd_wch</STRONG>, <STRONG>mvadd_wch</STRONG>, <STRONG>mvwadd_wch</STRONG>, <STRONG>echo_wchar</STRONG>, <STRONG>wecho_wchar</STRONG> - add
       a <EM>curses</EM> complex character to a window, possibly advancing the cursor


</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
       <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>

       <STRONG>int</STRONG> <STRONG>add_wch(const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG>
       <STRONG>int</STRONG> <STRONG>wadd_wch(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG>
       <STRONG>int</STRONG> <STRONG>mvadd_wch(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG>
       <STRONG>int</STRONG> <STRONG>mvwadd_wch(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG>
             <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG>

       <STRONG>int</STRONG> <STRONG>echo_wchar(const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG>
       <STRONG>int</STRONG> <STRONG>wecho_wchar(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG>

       <EM>/*</EM> <EM>(integer)</EM> <EM>constants</EM> <EM>*/</EM>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_BLOCK;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_BOARD;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_BTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_BULLET;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_CKBOARD;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_DARROW;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_DEGREE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_DIAMOND;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_HLINE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_LANTERN;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_LARROW;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_LLCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_LRCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_LTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_PLMINUS;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_PLUS;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_RARROW;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_RTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_S1;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_S9;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_TTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_UARROW;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_ULCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_URCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_VLINE;</STRONG>
       <EM>/*</EM> <EM>extensions</EM> <EM>*/</EM>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_GEQUAL;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_LEQUAL;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_NEQUAL;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_PI;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_S3;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_S7;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_STERLING;</STRONG>
       <EM>/*</EM> <EM>extensions</EM> <EM>for</EM> <EM>thick</EM> <EM>lines</EM> <EM>*/</EM>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_BTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_HLINE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_LLCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_LRCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_LTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_PLUS;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_RTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_TTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_ULCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_URCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_T_VLINE;</STRONG>
       <EM>/*</EM> <EM>extensions</EM> <EM>for</EM> <EM>double</EM> <EM>lines</EM> <EM>*/</EM>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_BTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_HLINE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_LLCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_LRCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_LTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_PLUS;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_RTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_TTEE;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_ULCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_URCORNER;</STRONG>
       /* <EM>...</EM> <EM>*/</EM> <STRONG>WACS_D_VLINE;</STRONG>


</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>

</PRE><H3><a name="h3-wadd_wch">wadd_wch</a></H3><PRE>
       <STRONG>wadd_wch</STRONG> writes the <EM>curses</EM> complex character <EM>wch</EM>  to  the  window  <EM>win</EM>,
       then  may  advance  the  cursor position, analogously to the standard C
       library's <STRONG>putwchar(3)</STRONG>.  <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>  describes  the  variants  of  this
       function.

       Construct  a <EM>curses</EM> complex character from a <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM> with <STRONG><A HREF="curs_getcchar.3x.html">setcchar(3x)</A></STRONG>.
       Much behavior depends on whether the wide characters in <EM>wch</EM> are spacing
       or non-spacing; see subsection "Complex Characters" below.

       <STRONG>o</STRONG>   If  <EM>wch</EM>  contains  a  spacing  character, then any character at the
           cursor is first removed.   The  complex  character  <EM>wch</EM>,  with  its
           attributes  and  color  pair  identifier,  becomes  the <EM>base</EM> of the
           <EM>active</EM> <EM>complex</EM> <EM>character</EM>.

       <STRONG>o</STRONG>   If <EM>wch</EM> contains only non-spacing characters, they are combined with
           the  active  complex  character.  <EM>curses</EM> ignores its attributes and
           color pair identifier, and does not advance the cursor.

       Further non-spacing characters added with <STRONG>wadd_wch</STRONG> are not  written  at
       the  new  cursor position but combine with the active complex character
       until another spacing character is written to the window or the  cursor
       is moved.

       If advancement occurs at the right margin,

       <STRONG>o</STRONG>   the  cursor  automatically wraps to the beginning of the next line,
           then,

       <STRONG>o</STRONG>   if  it  was  at  the  bottom  of  the  scrolling  region,  and   if
           <STRONG><A HREF="scrollok.3x.html">scrollok(3x)</A></STRONG>  is  enabled  for <EM>win</EM>, the scrolling region scrolls up
           one line.

       If <EM>wch</EM> is a backspace, carriage return, line feed, or tab,  the  cursor
       moves appropriately within the window.

       <STRONG>o</STRONG>   Backspace  moves  the cursor one character left; at the left margin
           of a window, it does nothing.

       <STRONG>o</STRONG>   Carriage return moves the cursor to the left  margin  on  the  same
           line of the window.

       <STRONG>o</STRONG>   Line  feed  does a <STRONG><A HREF="curs_clear.3x.html">clrtoeol(3x)</A></STRONG>, then advances as if from the right
           margin.

       <STRONG>o</STRONG>   Tab advances the cursor to the next tab stop (possibly on the  next
           line);  these  are placed at every eighth column by default.  Alter
           the   tab   interval    with    the    <STRONG>TABSIZE</STRONG>    extension;    see
           <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>.

       If  <EM>wch</EM>  is  any other nonprintable character, it is drawn in printable
       form using the same convention as <STRONG><A HREF="curs_util.3x.html">wunctrl(3x)</A></STRONG>.  Calling <STRONG><A HREF="curs_in_wch.3x.html">win_wch(3x)</A></STRONG>  on
       the  location of a nonprintable character does not return the character
       itself, but its <STRONG><A HREF="curs_util.3x.html">wunctrl(3x)</A></STRONG> representation.

       A <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM> can be copied from  place  to  place  using  <STRONG><A HREF="curs_in_wch.3x.html">win_wch(3x)</A></STRONG>  and
       <STRONG>wadd_wch</STRONG>.   See  <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>  for values of predefined constants that
       can be usefully "or"ed with characters.  A complex character whose only
       character  component  is  a  wide  space,  and  whose only attribute is
       <STRONG>WA_NORMAL</STRONG>, is a  <EM>blank</EM>  <EM>character</EM>,  and  therefore  combines  with  the
       background character; see <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG>.


</PRE><H3><a name="h3-wecho_wchar">wecho_wchar</a></H3><PRE>
       <STRONG>echo_wchar</STRONG>   and  <STRONG>wecho_wchar</STRONG>  are  equivalent  to  calling  (<STRONG>w</STRONG>)<STRONG>add_wch</STRONG>
       followed by (<STRONG>w</STRONG>)<STRONG>refresh</STRONG> on  <STRONG>stdscr</STRONG>  or  the  specified  window.   <EM>curses</EM>
       interprets  these  functions  as  a  hint  that only a single (complex)
       character is being output; for non-control characters,  a  considerable
       performance gain may be enjoyed by employing them.


</PRE><H3><a name="h3-Forms-Drawing-Characters">Forms-Drawing Characters</a></H3><PRE>
       <EM>curses</EM>  defines  macros  starting  with  <STRONG>WACS_</STRONG>  that  can  be used with
       <STRONG>wadd_wch</STRONG> to  write  line-drawing  and  other  symbols  to  the  screen.
       <EM>ncurses</EM>  terms  these <EM>forms-drawing</EM> <EM>characters.</EM>  The ACS default listed
       below is used if the <STRONG>acs_chars</STRONG>  (<STRONG>acsc</STRONG>)  <EM>terminfo</EM>  capability  does  not
       define  a  terminal-specific replacement for it, or if the terminal and
       locale configuration requires Unicode to access  these  characters  but
       the  library  is  unable  to  use  Unicode.   The  "acsc  char"  column
       corresponds to how the characters are specified in the <STRONG>acs_chars</STRONG> (<STRONG>acsc</STRONG>)
       string capability, and the characters in it may appear on the screen if
       the terminal type's database entry incorrectly advertises ACS  support.
       The name "ACS" originates in the Alternate Character Set feature of the
       DEC VT100 terminal.

                       <STRONG>Unicode</STRONG>   <STRONG>ACS</STRONG>       <STRONG>acsc</STRONG>
       <STRONG>Symbol</STRONG>          <STRONG>Default</STRONG>   <STRONG>Default</STRONG>   <STRONG>char</STRONG>   <STRONG>Glyph</STRONG> <STRONG>Name</STRONG>
       ------------------------------------------------------------------------
       <STRONG>WACS_BLOCK</STRONG>      U+25ae    #         0      solid square block
       <STRONG>WACS_BOARD</STRONG>      U+2592    #         h      board of squares
       <STRONG>WACS_BTEE</STRONG>       U+2534    +         v      bottom tee
       <STRONG>WACS_BULLET</STRONG>     U+00b7    o         ~      bullet
       <STRONG>WACS_CKBOARD</STRONG>    U+2592    :         a      checker board (stipple)
       <STRONG>WACS_DARROW</STRONG>     U+2193    v         .      arrow pointing down
       <STRONG>WACS_DEGREE</STRONG>     U+00b0    '         f      degree symbol
       <STRONG>WACS_DIAMOND</STRONG>    U+25c6    +         `      diamond
       <STRONG>WACS_GEQUAL</STRONG>     U+2265    &gt;         &gt;      greater-than-or-equal-to
       <STRONG>WACS_HLINE</STRONG>      U+2500    -         q      horizontal line
       <STRONG>WACS_LANTERN</STRONG>    U+2603    #         i      lantern symbol
       <STRONG>WACS_LARROW</STRONG>     U+2190    &lt;         ,      arrow pointing left
       <STRONG>WACS_LEQUAL</STRONG>     U+2264    &lt;         y      less-than-or-equal-to
       <STRONG>WACS_LLCORNER</STRONG>   U+2514    +         m      lower left-hand corner
       <STRONG>WACS_LRCORNER</STRONG>   U+2518    +         j      lower right-hand corner
       <STRONG>WACS_LTEE</STRONG>       U+2524    +         t      left tee
       <STRONG>WACS_NEQUAL</STRONG>     U+2260    !         |      not-equal
       <STRONG>WACS_PI</STRONG>         U+03c0    *         {      greek pi
       <STRONG>WACS_PLMINUS</STRONG>    U+00b1    #         g      plus/minus
       <STRONG>WACS_PLUS</STRONG>       U+253c    +         n      plus
       <STRONG>WACS_RARROW</STRONG>     U+2192    &gt;         +      arrow pointing right
       <STRONG>WACS_RTEE</STRONG>       U+251c    +         u      right tee
       <STRONG>WACS_S1</STRONG>         U+23ba    -         o      scan line 1
       <STRONG>WACS_S3</STRONG>         U+23bb    -         p      scan line 3
       <STRONG>WACS_S7</STRONG>         U+23bc    -         r      scan line 7
       <STRONG>WACS_S9</STRONG>         U+23bd    _         s      scan line 9
       <STRONG>WACS_STERLING</STRONG>   U+00a3    f         }      pound-sterling symbol
       <STRONG>WACS_TTEE</STRONG>       U+252c    +         w      top tee
       <STRONG>WACS_UARROW</STRONG>     U+2191    ^         -      arrow pointing up
       <STRONG>WACS_ULCORNER</STRONG>   U+250c    +         l      upper left-hand corner
       <STRONG>WACS_URCORNER</STRONG>   U+2510    +         k      upper right-hand corner

       <STRONG>WACS_VLINE</STRONG>      U+2502    |         x      vertical line

       The <EM>ncurses</EM> wide API also defines symbols for  thick  lines  (<STRONG>acsc</STRONG>  "J"
       through "N", "T" through "X", and "Q"):

                         <STRONG>Unicode</STRONG>   <STRONG>ASCII</STRONG>     <STRONG>acsc</STRONG>
       <STRONG>ACS</STRONG> <STRONG>Name</STRONG>          <STRONG>Default</STRONG>   <STRONG>Default</STRONG>   <STRONG>Char</STRONG>   <STRONG>Glyph</STRONG> <STRONG>Name</STRONG>
       ------------------------------------------------------------------------
       <STRONG>WACS_T_BTEE</STRONG>       U+253b    +         V      thick tee pointing up
       <STRONG>WACS_T_HLINE</STRONG>      U+2501    -         Q      thick horizontal line
       <STRONG>WACS_T_LLCORNER</STRONG>   U+2517    +         M      thick lower left corner
       <STRONG>WACS_T_LRCORNER</STRONG>   U+251b    +         J      thick lower right corner
       <STRONG>WACS_T_LTEE</STRONG>       U+252b    +         T      thick tee pointing right
       <STRONG>WACS_T_PLUS</STRONG>       U+254b    +         N      thick large plus
       <STRONG>WACS_T_RTEE</STRONG>       U+2523    +         U      thick tee pointing left
       <STRONG>WACS_T_TTEE</STRONG>       U+2533    +         W      thick tee pointing down
       <STRONG>WACS_T_ULCORNER</STRONG>   U+250f    +         L      thick upper left corner
       <STRONG>WACS_T_URCORNER</STRONG>   U+2513    +         K      thick upper right corner
       <STRONG>WACS_T_VLINE</STRONG>      U+2503    |         X      thick vertical line

       and for double lines (<STRONG>acsc</STRONG> "A" through "I", plus "R" and "Y"):

                         <STRONG>Unicode</STRONG>   <STRONG>ASCII</STRONG>     <STRONG>acsc</STRONG>
       <STRONG>ACS</STRONG> <STRONG>Name</STRONG>          <STRONG>Default</STRONG>   <STRONG>Default</STRONG>   <STRONG>Char</STRONG>   <STRONG>Glyph</STRONG> <STRONG>Name</STRONG>
       ------------------------------------------------------------------------
       <STRONG>WACS_D_BTEE</STRONG>       U+2569    +         H      double tee pointing up
       <STRONG>WACS_D_HLINE</STRONG>      U+2550    -         R      double horizontal line
       <STRONG>WACS_D_LLCORNER</STRONG>   U+255a    +         D      double lower left corner
       <STRONG>WACS_D_LRCORNER</STRONG>   U+255d    +         A      double lower right corner
       <STRONG>WACS_D_LTEE</STRONG>       U+2560    +         F      double tee pointing right
       <STRONG>WACS_D_PLUS</STRONG>       U+256c    +         E      double large plus
       <STRONG>WACS_D_RTEE</STRONG>       U+2563    +         G      double tee pointing left
       <STRONG>WACS_D_TTEE</STRONG>       U+2566    +         I      double tee pointing down
       <STRONG>WACS_D_ULCORNER</STRONG>   U+2554    +         C      double upper left corner
       <STRONG>WACS_D_URCORNER</STRONG>   U+2557    +         B      double upper right corner
       <STRONG>WACS_D_VLINE</STRONG>      U+2551    |         Y      double vertical line

       Unicode's  descriptions  for  these  characters  differs  slightly from
       <EM>ncurses</EM>, by introducing the term "light"  (along  with  less  important
       details).   Here are its descriptions for the normal, thick, and double
       horizontal lines:

       <STRONG>o</STRONG>   U+2500 BOX DRAWINGS LIGHT HORIZONTAL

       <STRONG>o</STRONG>   U+2501 BOX DRAWINGS HEAVY HORIZONTAL

       <STRONG>o</STRONG>   U+2550 BOX DRAWINGS DOUBLE HORIZONTAL


</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
       These functions return <STRONG>OK</STRONG> on success and <STRONG>ERR</STRONG> on failure.

       In <EM>ncurses</EM>, <STRONG>wadd_wch</STRONG> and <STRONG>wecho_wchar</STRONG> return <STRONG>ERR</STRONG> if

       <STRONG>o</STRONG>   the <EM>curses</EM> screen has not been initialized,

       <STRONG>o</STRONG>   (for functions taking a <EM>WINDOW</EM> pointer  argument)  <EM>win</EM>  is  a  null
           pointer,

       <STRONG>o</STRONG>   wrapping  to  a new line is impossible because <STRONG><A HREF="scrollok.3x.html">scrollok(3x)</A></STRONG> has not
           been called on <EM>win</EM> (or <STRONG>stdscr</STRONG>, as applicable) when writing  to  its
           bottom right location is attempted, or

       <STRONG>o</STRONG>   it  is  not  possible  to  add  a  complete character at the cursor
           position.

       Functions prefixed with "mv" first perform cursor movement and fail  if
       the position (<EM>y</EM>, <EM>x</EM>) is outside the window boundaries.


</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
       <STRONG>add_wch</STRONG>,  <STRONG>mvadd_wch</STRONG>,  <STRONG>mvwadd_wch</STRONG>,  and <STRONG>echo_wchar</STRONG> may be implemented as
       macros.


</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
       The  symbols  (<EM>WACS</EM><STRONG>_</STRONG><EM>S3</EM>,  <EM>WACS</EM><STRONG>_</STRONG><EM>S7</EM>,  <EM>WACS</EM><STRONG>_</STRONG><EM>LEQUAL</EM>,  <EM>WACS</EM><STRONG>_</STRONG><EM>GEQUAL</EM>,  <EM>WACS</EM><STRONG>_</STRONG><EM>PI</EM>,
       <EM>WACS</EM><STRONG>_</STRONG><EM>NEQUAL</EM>,  and  <EM>WACS</EM><STRONG>_</STRONG><EM>STERLING</EM>)  are  not  standard.   However,  many
       publicly  available   <EM>terminfo</EM>   entries   include   <EM>acs</EM><STRONG>_</STRONG><EM>chars</EM>   (<STRONG>acsc</STRONG>)
       capabilities  in which their key characters (<STRONG>pryz{|}</STRONG>) are embedded, and
       a second-hand list of their character descriptions has come  to  light.
       The <EM>ncurses</EM> developers invented WACS-prefixed names for them.


</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
       Applications employing <EM>ncurses</EM> extensions should condition their use on
       the visibility of the <STRONG>NCURSES_VERSION</STRONG> preprocessor macro.

       These functions are described in X/Open Curses Issue 4.   It  specifies
       no error conditions for them.

       The  defaults specified for forms-drawing characters apply in the POSIX
       locale.  X/Open Curses makes it clear that the WACS_ symbols should  be
       defined  as  a  pointer  to  <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM>  data,  e.g., in the discussion of
       <EM>border</EM><STRONG>_</STRONG><EM>set</EM>.  A few implementations are problematic:

       <STRONG>o</STRONG>   NetBSD <EM>curses</EM> defines the symbols as a <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM> within a <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM>.

       <STRONG>o</STRONG>   HP-UX <EM>curses</EM> equates some of the  <EM>ACS</EM><STRONG>_</STRONG>  symbols  to  the  analogous
           <EM>WACS</EM><STRONG>_</STRONG>  symbols  as  if  the <EM>ACS</EM><STRONG>_</STRONG> symbols were wide characters.  The
           misdefined symbols are the arrows and other symbols which  are  not
           used for line-drawing.

       X/Open  Curses  does  not  specify  symbols for thick- or double-lines.
       SVr4 <EM>curses</EM> implementations defined their line-drawing symbols in terms
       of  intermediate symbols.  <EM>ncurses</EM> extends those symbols, providing new
       definitions not found in SVr4 implementations.

       Not all  Unicode-capable  terminals  provide  support  for  VT100-style
       alternate character sets (i.e., the <EM>acsc</EM><STRONG>_</STRONG><EM>chars</EM> (<STRONG>acsc</STRONG>) capability), with
       their corresponding line-drawing characters.   X/Open  Curses  did  not
       address the aspect of integrating Unicode with line-drawing characters.
       Existing implementations of System V <EM>curses</EM> (AIX, HP-UX,  Solaris)  use
       only  the  <EM>acsc</EM><STRONG>_</STRONG><EM>chars</EM> (<STRONG>acsc</STRONG>) character-mapping to provide this feature.
       As a result, those  implementations  can  use  only  single-byte  line-
       drawing  characters.   <EM>ncurses</EM>  5.3  (2002) provided a table of Unicode
       values to solve these problems.  NetBSD <EM>curses</EM> incorporated that  table
       in 2010.

       <EM>ncurses</EM>   uses   the  Unicode  values  instead  of  the  terminal  type
       description's <EM>acsc</EM><STRONG>_</STRONG><EM>chars</EM> (<STRONG>acsc</STRONG>) mapping as discussed in <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> for
       the  environment  variable  <EM>NCURSES</EM><STRONG>_</STRONG><EM>NO</EM><STRONG>_</STRONG><EM>UTF8</EM><STRONG>_</STRONG><EM>ACS</EM>.   In contrast, for the
       same cases, the line-drawing characters described in <STRONG><A HREF="curs_addch.3x.html">addch(3x)</A></STRONG> will use
       only the ASCII default values.

       Having  Unicode available does not solve all of the problems with line-
       drawing for <EM>curses</EM>:

       <STRONG>o</STRONG>   The closest Unicode equivalents to the VT100 graphics <EM>S1</EM>,  <EM>S3</EM>,  <EM>S7</EM>,
           and  <EM>S9</EM> frequently are not displayed at the regular intervals which
           the terminal used.

       <STRONG>o</STRONG>   The <EM>lantern</EM> is a special case.  It originated with  the  AT&amp;T  4410
           terminal  in the early 1980s.  There is no accessible documentation
           depicting the lantern symbol on the AT&amp;T terminal.

           Lacking documentation, most readers assume that a <EM>storm</EM> <EM>lantern</EM> was
           intended.  But there are several possibilities, all with problems.

           Unicode  6.0  (2010)  does provide two lantern symbols: U+1F383 and
           U+1F3EE.  Those were not available  in  2002,  and  are  irrelevant
           since they lie outside the Basic Multilingual Plane and as a result
           are unavailable on many terminals.  They are not storm lanterns, in
           any case.

           Most <EM>storm</EM> <EM>lanterns</EM> have a tapering glass chimney (to guard against
           tipping); some have a wire grid protecting the chimney.

           For the tapering appearance,  U+2603 was adequate.   In  use  on  a
           terminal, no one can tell what the image represents.  Unicode calls
           it a snowman.

           Others have suggested these alternatives: &lt;section&gt; U+00A7 (section
           mark),  &lt;Theta&gt;  U+0398 (theta), &lt;Phi&gt; U+03A6 (phi), &lt;delta&gt; U+03B4
           (delta),  U+2327 (x in a rectangle),  U+256C (forms double vertical
           and horizontal), and  U+2612 (ballot box with x).


</PRE><H3><a name="h3-Complex-Characters">Complex Characters</a></H3><PRE>
       The  complex  character  type  <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM>  can  store  more  than one wide
       character (<EM>wchar</EM><STRONG>_</STRONG><EM>t</EM>).  X/Open Curses does not mention this  possibility,
       specifying  behavior  only  where  <EM>wch</EM>  is  a  single character, either
       spacing or non-spacing.

       <EM>ncurses</EM> assumes that <EM>wch</EM> is constructed using <STRONG><A HREF="curs_getcchar.3x.html">setcchar(3x)</A></STRONG>, and in turn
       that the result

       <STRONG>o</STRONG>   contains at most one spacing character at the beginning of its list
           of wide characters, and zero or more non-spacing characters, or

       <STRONG>o</STRONG>   holds one non-spacing character.

       In the latter case, <EM>ncurses</EM>  adds  the  non-spacing  character  to  the
       active complex character.


</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
       X/Open  Curses Issue 4 (1995) initially specified these functions.  The
       System V  Interface  Definition  (SVID)  Version 4  of  the  same  year
       specified  functions named <EM>waddwch</EM> (and the usual variants), <EM>echowchar</EM>,
       and <EM>wechowchar</EM>.  These were later additions to SVr4.<EM>x</EM>, not appearing in
       the  first SVr4 (1989).  They differed from X/Open's later <EM>wadd</EM><STRONG>_</STRONG><EM>wch</EM> and
       <EM>wecho</EM><STRONG>_</STRONG><EM>wchar</EM> in that they each took an argument of type <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM>  instead
       of <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM>.  SVID defined no  <EM>WACS</EM><STRONG>_</STRONG> symbols.

       X/Open  Curses  Issue 4  also  defined  many  of  the  <EM>WACS</EM><STRONG>_</STRONG> constants,
       excepting  <EM>WACS</EM><STRONG>_</STRONG><EM>GEQUAL</EM>,  <EM>WACS</EM><STRONG>_</STRONG><EM>LEQUAL</EM>,  <EM>WACS</EM><STRONG>_</STRONG><EM>NEQUAL</EM>,  <EM>WACS</EM><STRONG>_</STRONG><EM>PI</EM>,  <EM>WACS</EM><STRONG>_</STRONG><EM>S3</EM>,
       <EM>WACS</EM><STRONG>_</STRONG><EM>S7</EM>,  and  <EM>WACS</EM><STRONG>_</STRONG><EM>STERLING</EM>;  and  those  for drawing thick and double
       lines.

       <EM>ncurses</EM> 5.3 (2002) furnished the remaining <EM>WACS</EM><STRONG>_</STRONG> constants.


</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
       <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG> describes comparable functions of the <EM>ncurses</EM> library in
       its non-wide-character configuration.

       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,   <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>,   <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>,   <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>,
       <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG>, <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>,  <STRONG><A HREF="curs_getcchar.3x.html">curs_getcchar(3x)</A></STRONG>,  <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>,
       <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>, <STRONG>putwc(3)</STRONG>



ncurses 6.5                       2025-02-01                  <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
<li><a href="#h2-NAME">NAME</a></li>
<li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
<ul>
<li><a href="#h3-wadd_wch">wadd_wch</a></li>
<li><a href="#h3-wecho_wchar">wecho_wchar</a></li>
<li><a href="#h3-Forms-Drawing-Characters">Forms-Drawing Characters</a></li>
</ul>
</li>
<li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
<li><a href="#h2-NOTES">NOTES</a></li>
<li><a href="#h2-EXTENSIONS">EXTENSIONS</a></li>
<li><a href="#h2-PORTABILITY">PORTABILITY</a>
<ul>
<li><a href="#h3-Complex-Characters">Complex Characters</a></li>
</ul>
</li>
<li><a href="#h2-HISTORY">HISTORY</a></li>
<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
</ul>
</div>
</BODY>
</HTML>
